package yf.mall.service;

import yf.mall.entity.CourseCardEntity;
import yf.mall.entity.CourseEntity;
import yf.mall.entity.SignEntity;
import com.yf.service.BaseService;
import yf.mall.vo.CourseSumVo;

import java.util.List;

/**
 * 讲堂Service接口
 *
 * @author hxf
 * @email 505860922@qq.com
 * @date Mon Oct 21 08:39:57 CST 2019
 */
public interface CourseService extends BaseService<CourseEntity> {


    /**

     List<CourseVo> queryListVo(CourseVo courseVo);

        CourseVo getVo(Long id);

     **/

   List<CourseSumVo>  sumSign(Long courserId);

   /***********BACK***********/

    /***********API***********/

    //找出某个课程未开课的班
    List<CourseEntity> findByWait(Long goodsId);

    //找出所有可等待的课程
    List<CourseEntity> findByWait();

    //新增课程
    CourseCardEntity initCourseCard(Long userId,Long storeId);

    //找出所有的课程券 userId or createdId
    List<CourseCardEntity> findCardByUserId(Long userId);

    //赠送课程
    CourseCardEntity sendCard(Long userId,Long cardId,Long toUserId);

    //扫码获取课程或者消费课程
    CourseCardEntity scan(Long userId,String code);

    //报名
    SignEntity sign(String name, String phone, String remark, Long courserId, Long cardId, Long userId);

    //确认报名
    SignEntity confirm(Long userId,Long signId);
}
